package ciyuan.Gui;

import ciyuan.Block.Machine.Stream.jygl.JyglContainer;
import ciyuan.Block.Machine.ddfsj.DdfsjContainer;
import ciyuan.Block.Machine.dlb.DlbContainer;
import ciyuan.Block.Machine.fkqgj.FkqgjContainer;
import ciyuan.Block.Machine.fsj.FsjContainer;
import ciyuan.Block.Machine.fyc.FycContainer;
import ciyuan.Block.Machine.gl.GlContainer;
import ciyuan.Block.Machine.lyj.LyjContainer;
import ciyuan.Block.Machine.pljsrl.PljsrlContainer;
import ciyuan.Block.Machine.rmfdj.RmfdjContainer;
import ciyuan.Block.Machine.ryfdj.RyfdjContainer;
import ciyuan.Block.Machine.st.ContainerProgress;
import ciyuan.Block.Machine.st.StContainer;
import ciyuan.Block.Machine.tcjhc.TcjhcContainer;
import ciyuan.Block.Machine.yjcxj.YjcxjContainer;
import ciyuan.Block.Machine.yyj.YyjContainer;
import ciyuan.Block.Machine.yyjlq.YyjlqContainer;
import ciyuan.Block.Mortar.MortarContainer;
import ciyuan.Gui.Ornaments.OrnamentsContainer;
import ciyuan.MainClass;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.container.ContainerType;
import net.minecraft.network.PacketBuffer;
import net.minecraftforge.common.extensions.IForgeContainerType;
import net.minecraftforge.fml.RegistryObject;
import net.minecraftforge.registries.DeferredRegister;
import net.minecraftforge.registries.ForgeRegistries;

/**
 * @author 150149
 */
public class ContainerRegistry {

    public static final DeferredRegister<ContainerType<?>> CONTAINERS = DeferredRegister.create(ForgeRegistries.CONTAINERS, MainClass.MODID);
    public static final RegistryObject<ContainerType<MortarContainer>> obsidianFirstContainer = CONTAINERS.register("mortarcontainer", () -> IForgeContainerType.create((int windowId, PlayerInventory inv, PacketBuffer data) -> new MortarContainer(ContainerType.GENERIC_3x3, windowId, inv, data.readBlockPos())));
    public static final RegistryObject<ContainerType<PljsrlContainer>> pljsrlContainer = CONTAINERS.register("pljsrlcontainer", () -> IForgeContainerType.create((int windowId, PlayerInventory inv, PacketBuffer data) -> new PljsrlContainer(ContainerType.GENERIC_3x3, windowId, inv, data.readBlockPos())));
    public static final RegistryObject<ContainerType<GlContainer>> glContainer = CONTAINERS.register("glcontainer", () -> IForgeContainerType.create((int windowId, PlayerInventory inv, PacketBuffer data) -> new GlContainer(ContainerType.GENERIC_3x3, windowId, inv, data.readBlockPos())));
    public static final RegistryObject<ContainerType<FsjContainer>> fsjContainer = CONTAINERS.register("fsjcontainer", () -> IForgeContainerType.create((int windowId, PlayerInventory inv, PacketBuffer data) -> new FsjContainer(ContainerType.GENERIC_3x3, windowId, inv, data.readBlockPos())));
    public static final RegistryObject<ContainerType<DdfsjContainer>> ddfsjContainer = CONTAINERS.register("ddfsjcontainer", () -> IForgeContainerType.create((int windowId, PlayerInventory inv, PacketBuffer data) -> new DdfsjContainer(ContainerType.GENERIC_3x3, windowId, inv, data.readBlockPos())));
    public static final RegistryObject<ContainerType<YyjlqContainer>> yyjlqContainer = CONTAINERS.register("yyjlqcontainer", () -> IForgeContainerType.create((int windowId, PlayerInventory inv, PacketBuffer data) -> new YyjlqContainer(ContainerType.GENERIC_3x3, windowId, inv, data.readBlockPos())));
    public static final RegistryObject<ContainerType<StContainer>> stContainer = CONTAINERS.register("stcontainer", () -> IForgeContainerType.create((int windowId, PlayerInventory inv, PacketBuffer data) -> new StContainer(ContainerType.GENERIC_3x3, windowId, inv, data.readBlockPos(),new ContainerProgress())));
    public static final RegistryObject<ContainerType<DlbContainer>> dlbContainer = CONTAINERS.register("dlbcontainer", () -> IForgeContainerType.create((int windowId, PlayerInventory inv, PacketBuffer data) -> new DlbContainer(ContainerType.GENERIC_3x3, windowId, inv, data.readBlockPos(), new ciyuan.Block.Machine.dlb.ContainerProgress())));
    public static final RegistryObject<ContainerType<JyglContainer>> jyglContainer = CONTAINERS.register("jyglcontainer", () -> IForgeContainerType.create((int windowId, PlayerInventory inv, PacketBuffer data) -> new JyglContainer(ContainerType.GENERIC_3x3, windowId, inv, data.readBlockPos(), new ciyuan.Block.Machine.Stream.jygl.ContainerProgress())));
    public static final RegistryObject<ContainerType<FycContainer>> FycContainer = CONTAINERS.register("fyccontainer", () -> IForgeContainerType.create((int windowId, PlayerInventory inv, PacketBuffer data) -> new FycContainer(ContainerType.GENERIC_3x3, windowId, inv, data.readBlockPos(), new ciyuan.Block.Machine.fyc.ContainerProgress())));
    public static final RegistryObject<ContainerType<TcjhcContainer>> tcjhcContainer = CONTAINERS.register("tcjhccontainer", () -> IForgeContainerType.create((int windowId, PlayerInventory inv, PacketBuffer data) -> new TcjhcContainer(ContainerType.GENERIC_3x3, windowId, inv, data.readBlockPos())));
    public static final RegistryObject<ContainerType<YyjContainer>> yyjContainer = CONTAINERS.register("yyjcontainer", () -> IForgeContainerType.create((int windowId, PlayerInventory inv, PacketBuffer data) -> new YyjContainer(ContainerType.GENERIC_3x3, windowId, inv, data.readBlockPos(),new ciyuan.Block.Machine.yyj.ContainerProgress())));
    public static final RegistryObject<ContainerType<YjcxjContainer>> yjcxjContainer = CONTAINERS.register("yjcxjcontainer", () -> IForgeContainerType.create((int windowId, PlayerInventory inv, PacketBuffer data) -> new YjcxjContainer(ContainerType.GENERIC_3x3, windowId, inv, data.readBlockPos(),new ciyuan.Block.Machine.yjcxj.ContainerProgress())));
    public static final RegistryObject<ContainerType<ciyuan.Block.Machine.lyj.LyjContainer>> lyjContainer = CONTAINERS.register("lyjcontainer", () -> IForgeContainerType.create((int windowId, PlayerInventory inv, PacketBuffer data) -> new LyjContainer(ContainerType.GENERIC_3x3, windowId, inv, data.readBlockPos())));
    public static final RegistryObject<ContainerType<ciyuan.Block.Machine.fkqgj.FkqgjContainer>> fkqgjContainer = CONTAINERS.register("fkqgjcontainer", () -> IForgeContainerType.create((int windowId, PlayerInventory inv, PacketBuffer data) -> new FkqgjContainer(ContainerType.GENERIC_3x3, windowId, inv, data.readBlockPos())));
    public static final RegistryObject<ContainerType<ciyuan.Block.Machine.rmfdj.RmfdjContainer>> rmfdjContainer = CONTAINERS.register("rmfdjcontainer", () -> IForgeContainerType.create((int windowId, PlayerInventory inv, PacketBuffer data) -> new RmfdjContainer(ContainerType.GENERIC_3x3, windowId, inv, data.readBlockPos(),new ciyuan.Block.Machine.rmfdj.ContainerProgress())));
    public static final RegistryObject<ContainerType<ciyuan.Block.Machine.ryfdj.RyfdjContainer>> ryfdjContainer = CONTAINERS.register("ryfdjcontainer", () -> IForgeContainerType.create((int windowId, PlayerInventory inv, PacketBuffer data) -> new RyfdjContainer(ContainerType.GENERIC_3x3, windowId, inv, data.readBlockPos(),new ciyuan.Block.Machine.ryfdj.ContainerProgress())));

    public static final RegistryObject<ContainerType<OrnamentsContainer>> ornamentsContainer = CONTAINERS.register("ornamentscontainer", () -> IForgeContainerType.create((int windowId, PlayerInventory inv, PacketBuffer data) -> new OrnamentsContainer(ContainerType.GENERIC_3x3, windowId,inv)));
}
